<template>
        <div style="float:right;margin-right: 80px">

          <div>
            <span style="margin-left: 20px;display: inline-block">欢迎你：{{username}}</span>
            <a @click="logout" style="margin-left: 20px;display: inline-block">注销登录</a>

          </div>
        </div>
        <!-- <div>adsghljfakl;</div> -->


</template>
<script>
// import User from '@/components/User'
export default{
    name:'l_header',
    data(){
        return{
          username:localStorage.getItem('username')
        }
    },

    methods:{
      logout(){
        localStorage.clear()
        this.$router.push('/login')
      }
    },
    components:{
      // User
    }
}
</script>
